package com.shidaimanong.demo.json;

import com.google.gson.Gson;

public class JsonDemo1 {
    public static void main(String[] args) {
        String jsonStr = "{\"name\":\"赵丽颖\",\"size\":\"B\",\"birthday\":\"1987年10月16日\",\"birthplace\":\"河北省廊坊市\"}";
        Gson gson = new Gson();
        Girl girl = gson.fromJson(jsonStr, Girl.class);
        System.out.println("姓名:" + girl.name);
        System.out.println("生日:" + girl.birthday);
    }
}

class Girl {
    public String name;
    public String size;
    public String birthday;
    public String birthplace;
}
